<template>
  <el-table :data="tableData"
            border
            style="width: 100%">
    <el-table-column prop="id"
                     label="订单编号"
                     align="center"
                     width="80px">
    </el-table-column>
    <el-table-column prop="date"
                     label="提交时间"
                     align="center">
    </el-table-column>
    <el-table-column prop="username"
                     label="用户名"
                     align="center">
    </el-table-column>
    <el-table-column prop="doctor"
                     label="医生"
                     align="center">
    </el-table-column>
    <el-table-column prop="department"
                     label="科室"
                     align="center">
    </el-table-column>
    <el-table-column prop="money"
                     label="挂号费"
                     align="center">
    </el-table-column>
    <el-table-column prop="state"
                     label="订单状态"
                     align="center">
    </el-table-column>
    <el-table-column prop=""
                     label="操作"
                     align="center">
      <template slot-scope="scope">
        <!-- scope里面记录了当前行的下标，数据 -->
        <el-button type="success"
                   @click="info(scope)"
                   size="mini">查看订单</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: 'GuahaoData',
  props: ['tableData'],
  data(){
    return{
      // tableData:[],
    }
  },

  methods: {
    info: function (scope) {
      this.$router.push({
        name: 'GuahaoDetail',
        query: { id: scope.row.id },
      })
    },
    update: function (scope) {},
    del: function (scope) {
      alert('删除')
    },
  },
  created() {
   
  },
}
</script>

<style scoped>
</style>
